using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;

public partial class Admin_ChiTietDoanhNghiep : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        try
        {
            int id = int.Parse(Request.QueryString["id"]);

            tbDoanhNghiepEntities DoanhNghiep = tbDoanhNghiepBUS.GetByID(id);
            lit_MaDN.Text = DoanhNghiep.MaDN.ToString();
            lit_TenDN.Text = DoanhNghiep.TenDN.ToString();
            lit_TaiKhoan.Text = DoanhNghiep.TaiKhoan.ToString();
            lit_MatKhau.Text = DoanhNghiep.MatKhau.ToString();
            lit_Email.Text = DoanhNghiep.Email.ToString();
            lit_DiaChi.Text = DoanhNghiep.DiaChi.ToString();
            lit_DienThoai.Text = DoanhNghiep.DienThoai.ToString();
        }
        catch
        {
            Response.Redirect("~/Admin/DanhSachDoanhNghiep.aspx");
        }

    }
}
